/**
 * 3. 调度方案
 */

function xunFillDataSchedulingPlan(data){
	Ext.data.StoreManager.lookup('xunSPstore3_2').setData(data);
}

Ext.define('Admin.view.needwater.xunpack.subpage.schedulingPlan',{
	extend:'Ext.grid.Panel',
	xtype:'xunSchedulingPlan',
	//起别名
	alias:'xunSchedulingPlan',
	require:[],
	user:[],
	userCLs:'big-100 small-100',
	border: false,
	store: {xtype:'store', storeId: 'xunSPstore3_2'},
	border: true,
	margin: '20 10 10 10',
	columns: [
		{ text: '月份', dataIndex: 'time', minWidth: 100, align: 'center' },
		{text: '沙子岭', columns:[{ text: '入流', dataIndex: 'col1_inflow', minWidth: 100, align: 'center', renderer:
				function customRound(value, record){
					if(value == null)return null;
					return Ext.util.Format.round(value, 0);
				}
		}]},
		{text: '南城站上游（盱江段）', columns:[
			{ text: '分配', dataIndex: 'col2_allocate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '供水', dataIndex: 'col2_supply', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水', dataIndex: 'col2_lack', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水率', dataIndex: 'col2_lackRate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 3);
					}
			}]},
		{text: '洪门水库', columns:[
			{ text: '入流', dataIndex: 'col4_inflow', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 0);
					}
			},
			{ text: '水位', dataIndex: 'col4_level', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 2);
					}
			},
			{ text: '出流', dataIndex: 'col4_outflow', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 0);
					}
			}]},
		{text: '南城站(洪门-抚河段)', columns:[
			{ text: '分配', dataIndex: 'col5_allocate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '供水', dataIndex: 'col5_supply', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水', dataIndex: 'col5_lack', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水率', dataIndex: 'col5_lackRate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 3);
					}
			}]},
	//	{text: '洪廖区间', columns:[{ text: '入流', dataIndex: 'index14', minWidth: 100, align: 'center' }]},
		{text: '廖坊水库', columns:[
			{ text: '入流', dataIndex: 'col6_inflow', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 0);
					}
			},
			{ text: '水位', dataIndex: 'col6_level', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 2);
					}
			},
			{ text: '出流', dataIndex: 'col6_outflow', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 0);
					}
			}]},
		{text: '廖坊至李家渡', columns:[
			{ text: '分配', dataIndex: 'col7_allocate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '供水', dataIndex: 'col7_supply', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水', dataIndex: 'col7_lack', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.number(value, '0.000');
					}
			},
			{ text: '缺水率', dataIndex: 'col7_lackRate', minWidth: 100, align: 'center', renderer:
					function customRound(value, record){
						if(value == null)return null;
						return Ext.util.Format.round(value, 3);
					}
			}]}
	]
});
